package servlets;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebServlet("/Retweet")
public class Retweet extends HttpServlet {
	private static final long serialVersionUID = 1L;

	public Retweet() {
		super();
	}

	@Override
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doPost(request, response);
	}

	@Override
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

		String tweetDesc = request.getParameter("retweet");
		String login = request.getRemoteUser();

		/*
		 * TODO:UsuarioDao uDao = new UsuarioDao(); Usuario usu =
		 * uDao.buscarUsuarioPeloLogin(login); uDao.retweetar(usu,tweetDesc);
		 * 
		 * RequestDispatcher rd = request.getRequestDispatcher();
		 * rd.forward(request, response);
		 */
	}

}
